#!/bin/bash

export ranger_tagsync_conf=/opt/edp/ranger/conf
rm -rf /home/ranger/apache-ranger-usersync/install.properties
cp -f /opt/edp/ranger/conf/rangerusersync-install.properties  /home/ranger/apache-ranger-usersync/install.properties
ln -s /opt/edp/ranger/conf /home/ranger/apache-ranger-usersync/conf
mkdir /opt/edp/ranger/log/ranger-usersync
ln -s /opt/edp/ranger/log/ranger-usersync  /home/ranger/apache-ranger-usersync/logs
cd /home/ranger/apache-ranger-usersync/
mkdir /opt/edp/ranger/conf/cert
touch /opt/edp/ranger/conf/cert/unixauthservice.jks
sh ./setup.sh
sh /home/ranger/apache-ranger-usersync/ranger-usersync-services.sh start 
tail -f /dev/null

